/*
Copyright (C) Ariff Ehsan, Abdul Hadi Fikri

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

/*  Author : Ariff Ehsan
 *  Date   : June 27, 2009
 */


#ifndef __LEDS8_H__
#define __LEDS8_H__

#include <system.h>

#ifndef LEDS8_PORT
#error leds port is not defined. please defined in anos_config.h
#endif

#ifndef LEDS8_DDR
#error leds ddr is not defined. please defined in anos_config.h
#endif


/**
 *  Leds8 initialization
 *  - Needs to be called before using the library
 */
void LEDS8_init(void);


/**
 *  Leds8 single pin control - ON
 *  - turn ON a single LED output
 */
void LEDS8_on(uint8_t pin);


/**
 *  Leds single pin control - OFF
 *  - turn OFF a single LED output
 */
void LEDS8_off(uint8_t pin);


/**
 *  Leds8 single pin control - TOGGLE
 *  - toggle a single LED output
 */
void LEDS8_toggle(uint8_t pin);


/**
 *  Leds8 set port value
 */
void LEDS8_set(uint8_t value);


#endif // __LEDS8_H__
